<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>键盘修饰符</title>
</head>
<body>
<div id="app">
    <input type="text" name="wd" id="wd" v-on:keyup="onkeyup">
    <br>
    <!--  <input type="text" name="wd" v-model="content"  v-on:keyup="onkey">-->
    <br>
    <!--  <input type="text" name="wd" v-model="content"  v-on:keyup.enter="onkey">-->
    <input type="text" name="wd" v-model="content" v-on:keyup.ctrl.alt="onkey">
</div>
<script type="module">
    import {createApp, ref} from "../../../../js/vue.esm-browser.js";

    const app = createApp({
        setup() {
            let content = ref(null)

            function onkeyup() {
                let element = document.getElementById("wd")
                console.log(element.value);
            }

            function onkey() {
                console.log(this.content);
            }

            return {content, onkeyup, onkey}
        }
    })

    app.mount("#app")
</script>
</body>
</html>